import { request } from '@/apis';
import { addPrefix } from '@/utils/helper';

const prefixUrl = '/ep-query';

const Api = {
  /** 申请前信息 */
  permitBeforeF9: '/permitBeforeF9',
  /** 排污许可证 */
  permitF9: '/permitF9',
  /** 限期整改 */
  permitRectificationF9: '/permitRectificationF9',
  /** 登记信息 */
  permitRegistrationF9: '/v2/pc/permitRegistrationF9',
  /** 执行报告 */
  permitImplementationReportF9: '/v2/pc/permitImplementationReportF9',
  /** 排污许可限值 */
  permitReportF9: '/permitReportF9',
  /** 排污许可限值获取年份 */
  permitReportYear: '/permitReportYear',
  /** 撤消/注销 */
  permitBlendF9: '/permitBlendF9'
};

addPrefix(Api, prefixUrl);

export interface DynamicsProps extends PageProps {
  /** 公司 id */
  id: string;
}

/** 申请前信息 */
export const getPermitBeforeF9 = (params: DynamicsProps) => request.get({ url: Api.permitBeforeF9, params });
/** 排污许可证 */
export const getPermitF9 = (params: any) => request.get({ url: Api.permitF9, params });
/** 限期整改 */
export const getPermitRectificationF9 = (params: DynamicsProps) => request.get({ url: Api.permitRectificationF9, params });
/** 登记信息 */
export const getPermitRegistrationF9 = (params: DynamicsProps) => request.get({ url: Api.permitRegistrationF9, params });
/** 执行报告 */
export const getPermitImplementationReportF9 = (params: DynamicsProps) => request.get({ url: Api.permitImplementationReportF9, params });
/** 排污许可限值 */
export const getPermitReportF9 = (params: DynamicsProps) => request.get({ url: Api.permitReportF9, params });
/** 撤消/注销 */
export const getPermitBlendF9 = (params: DynamicsProps) => request.get({ url: Api.permitBlendF9, params });
